// import request from 'umi-request';
import request from '@/utils/request';
export async function queryRule(params) {
  params.parent = true;
  return request('/factory/terminal/serviceModule', { params });
}
export async function removeRule(params) {
  return request(`/factory/terminal/serviceModule/${params}`, {
    method: 'DELETE',
  });
}
export async function addRule(params) {
  return request('/factory/terminal/serviceModule', {
    method: 'POST',
    data: { ...params },
  });
}

export async function updateRule(params) {
  return request('/factory/terminal/serviceModule', {
    method: 'PUT',
    data: { ...params },
  });
}
